feat: support BlockRun account API billing - #4
Merged
Conversation
…on startup
`scripts/lib/oracle.mjs:323` builds `new LLMClient({ apiKey: ... })`, but the
dependency pinned `@blockrun/llm@^3.13.6` with the lockfile at 3.13.6. That
release does not accept `apiKey` and demands a wallet instead, so the account
path threw before it did anything:
3.13.6 -> THROWS: Private key required. Pass privateKey in options or
set BASE_CHAIN_WALLET_KEY environment variable.
3.15.0 -> constructed OK, authMode = api-key
The suite did not catch this: 5 passed both before and after, because nothing
covers the account branch of `resolveClient`. The check above was run directly
against both versions rather than inferred.
3.15.0 is the release carrying blockrun-llm-ts#36, published today. Same fix
as franklin-canvas#2, which had the same pin and whose tests DID catch it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014Je8JRrGK7mifyGbf8VjRM
Contributor
|
Pushed a dependency fix (76d1ec6) — the account path threw before doing anything.
The suite did not catch this — 5 passed before and after, because nothing covers the account branch of Pinned to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Franklin.bet's generator and CI previously required a Base x402 wallet, and the public docs/site said API keys were unsupported. This makes
BLOCKRUN_API_KEYthe preferred billing credential for chat generation, passes it through both automation workflows (including Franklin agent mode), preserves wallet fallback, and updates the site, README, env template, and contributor guidance with account registration, credits, and key links. Wallet documentation now lists Solana before Base where the Franklin agent supports both.Depends on BlockRunAI/blockrun-llm-ts#36 and BlockRunAI/Franklin#156. Refresh the lockfile to the SDK release containing #36 before merge.
Validation:
npm test— 5/5 passnpm pack --dry-runresolveClient:openai/gpt-4.1-nanoreturned the expected result, selected account billing, created no wallet files, and exposed no credential in outputnpm audit— 0 vulnerabilities